<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2021/6/1
  Time: 11:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/common/common.jsp" %>
<html>
<head>
    <title>Title</title>
    <script>
        $(function () {
            $('#myFile').fileinput({
                language: 'zh',
                uploadUrl: "<%=path%>/file/upLoadFile",
                browseClass: 'btn btn-success',
                maxFileCount: 3,
                enctype: "multipart/form-data",
                maxFileSize: 999999, // 单位kb
                allowedFileExtensions: ['jpg', 'png', 'gif'],
            });

            // ajax上传成功之后调用该事件
            $('#myFile').on("fileuploaded", function (event, data, previewId, index) {
                var fileUrl = data.response.imgUrl;
                $("#img_url").val(fileUrl)
            })
        })

    </SCRIPT>
</head>
<body>
<form id="update_add">
    <input type="hidden" name="rid" value="${r.rid}">
    旅游地风景 <input type="text" name="rname" value="${r.rname}"><br>

    旅游地价格 <input type="text" name="price" value="${r.price}"><br>

    '旅游地简介 <input type="text" name="routeintroduce" value="${r.routeintroduce}"><br>
    是否是旅游主题 <input type="radio" name="rflag" value="1" <c:if test="${r.rflag == 1}">checked</c:if>>上架
    <input type="radio" name="rflag" value="2" <c:if test="${r.rflag == 2}">checked</c:if>>下架<br>

<%--        上架时间 <input type="date" name="rdate"--%>
<%--                    value="<fmt:formatDate value='${r.rdate}' pattern='yyy-MM-dd'> </fmt:formatDate>"><br>--%>
    是否是旅游主题:<input type="radio" name="isthemetour" value="0" <c:if test="${r.isthemetour==0}">checked</c:if>>是
    <input type="radio" name="isthemetour" value="1" <c:if test="${r.isthemetour==1}">checked></c:if>> 不是<br>

    收藏数量: <input type="text" name="count" value="${r.count}"><br>
    抓取数据的来源id <input type="text" name="sourceid" value="${r.sourceid}"><br>
    所属商家表id <select id="sid" name="sid">
    <option>请选择</option>
    <c:forEach items="${s}" var="s">
        <option value="${s.sid}" <c:if test="${s.sid == r.sid}">selected</c:if>>${s.sname}</option>
    </c:forEach>

</select><br>


    旅游线路分类表 :<select id="cid" name="cid">
    <option>请选择</option>
    <c:forEach items="${c}" var="c">
        <option value="${c.cid}" <c:if test="${c.cid == r.cid}">selected</c:if>>${c.cname}</option>
    </c:forEach>
</select><br>
    <img src="<%=path%>/file/dowload?filename=${r.rimage}"><br>
    <input type="file" class="form-control" name="myFile" id="myFile" multiple>
    <input type="text" name="rimage" id="img_url" value="${r.rimage}">

</form>

</body>
</html>
